#include "proxytool.hpp"
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cerrno>

int_t main() {
	//CHttpProxyTool http_proxy;
	//http_proxy.SetProxyServer("127.0.0.1", 3128);
	//http_proxy.SetProxyAuth("windy", "windy");
	//http_proxy.ConnectServer ("127.0.0.1", 80);

	//CSocks5ProxyTool socks5_proxy;
	//socks5_proxy.SetProxyServer("127.0.0.1", 2080);
	////socks5_proxy.SetProxyAuth("windy", "windy");
	//socks5_proxy.ConnectServer("127.0.0.1", 80);

	//char buffer[8092] = {0};
	//char snd1[] = "GET http://127.0.0.1/ HTTP/1.1\r\n"\
	//	"Accept: */*\r\n"\
	//	"User-Agent: Mozilla/4.0\r\n"\
	//	"Host:127.0.0.1\r\n"\
	//	"Content-Type: text/html\r\n"\
	//	"Content-Length: 0\r\n\r\n";

	//send(socks5_proxy.m_sSocket, snd1, strlen(snd1), 0);
	//int err = GetLastError();
	//memset(buffer, 0, 8092);
	//recv(socks5_proxy.m_sSocket, buffer, 8092, 0);
	//printf("%s\n", buffer);

	char_t szrest[1024] = {0};
	Base64Encode("windy", "windy", szrest);
	
	return 0;
}